#include<stdio.h>
int main()
{
	int i;
	int n=0;
	char s[50]="";
	gets(s);
	while(s[n]!='\0')
	{
		n++;
	}
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]>='a'&&s[i]<='z')
			s[i]='z'-('z'-s[i]+3)%26;
		else if(s[i]>='A'&&s[i]<='Z')
			s[i]='Z'-('Z'-s[i]+3)%26;
	}
	for(i=0;i<n/2;i++)
	{
		char a=s[i];
		s[i]=s[n-1-i];
		s[n-1-i]=a;
	}
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]>='a'&&s[i]<='z')
			s[i]-=32;
		else if(s[i]>='A'&&s[i]<='Z')
			s[i]+=32;
	}
	puts(s);
	return 0;
}
